Hello, I seem to be having difficulting displaying BOLD text in any module object text. When i try the usual "{\\b BOLD}", the object text looks like {\b BOLD} in the actual module. I have also tried casting the string like richText "{\\b BOLD}" but that doesnt seem to be working. Any help would be appreciated.
Thanks ABoucaud - Thu May 25 12:35:05 EDT 2017 |
Re: Displaying Bold Text in Object Text/Heading Hello,
I don't know exactly what you did without parts of your code but it seems that you did this:
an_object."Object Text" = "{\\b A sentence you want bold}"
This is NOT ok and you shall use richText to do this:
an_object."Object Text" = richText( "{\\b A sentence you want bold\\b0}" )
And if you want to concatenante RTF strings with existing Object Text content, you can do this:
an_object."Object Text" = richText( richTextNoOle(an_object."Object Text") "\n{\\b A sentence you want bold\\b0}" )
By extension:
an_object."Object Text" = richText( richTextNoOle(an_object."Object Text") "\n{\\b A sentence you want bold\\b0}\nAnother sentence not bold." )
A last point: - if have OLE in your Object Text and you don't want to lose them you should use richTextWithOle() - you cant do same things in another attribute than Object Text - take care of usage of strings with richTextWithOle() because it will generate very big strings ! You should use buffers
You can check those threads for more informations about concatenate RTF and about string table (Mathias analysis):
-Christophe- |
Re: Displaying Bold Text in Object Text/Heading ChristopheP - Fri May 26 05:35:30 EDT 2017 Hello,
I don't know exactly what you did without parts of your code but it seems that you did this:
an_object."Object Text" = "{\\b A sentence you want bold}"
This is NOT ok and you shall use richText to do this:
an_object."Object Text" = richText( "{\\b A sentence you want bold\\b0}" )
And if you want to concatenante RTF strings with existing Object Text content, you can do this:
an_object."Object Text" = richText( richTextNoOle(an_object."Object Text") "\n{\\b A sentence you want bold\\b0}" )
By extension:
an_object."Object Text" = richText( richTextNoOle(an_object."Object Text") "\n{\\b A sentence you want bold\\b0}\nAnother sentence not bold." )
A last point: - if have OLE in your Object Text and you don't want to lose them you should use richTextWithOle() - you cant do same things in another attribute than Object Text - take care of usage of strings with richTextWithOle() because it will generate very big strings ! You should use buffers
You can check those threads for more informations about concatenate RTF and about string table (Mathias analysis):
-Christophe- Yes. You are correct. My problem was that since I wanted only part of the object text to be BOLD I was only casting richText on part of the text. The correct answer is the still richText cast the entire object text but then I can put "{\\b <text> }" around what I wanted to be BOLD specifically. Thank you very much. |